<template>
  <div>
    <ul style="padding:50rpx;">
      <li class="lidi">上课日期：{{start}}</li>
      <li class="lidi">上课时间：{{schooltime}}</li>
      <li class="lidi indet">班级：{{title}}</li>
      <li class="lidi indet">校区：{{xiaoqu}}</li>
      <li class="lidi indet">教室：{{classban}}</li>
      <li class="lidi indet">教师：{{teacher}}</li>
      <li class="lidi indet">助教：{{zhuteacher}}</li>
      <li class="lidi" v-if="info!='null'">课程内容：{{info}}</li>
      <li class="lidi">学习状态：{{type}}</li>
      <li class="lidi">课堂评分：<i-rate
            :value="grade" style="line-height:1rpx;">
        </i-rate></li>
      <li class="lidi">课堂评价：{{data}}</li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      url: "",
      classban:"",
      data:"",
      schooltime:"",
      start:"",
      teacher:"",
      title:"",
      type:"",
      xiaoqu:"",
      grade : "",
      info : "",
      schooluserids:"",
      zhuteacher:"",
    };
  },
  onLoad(option) {
    console.log(option)
    this.url = option.key;
    this.classban = option.classban;
    this.data = option.data;
    this.schooltime = option.schooltime;
    this.start = option.start;
    this.teacher = option.teacher;
    this.title = option.title;
    this.type = option.type;
    this.grade = option.grade;
    this.info = option.info;
    this.schooluserids = option.schooluserids;
  },
  mounted(){
    this.startss()
  },
  methods: {
    startss(){
      var that = this
      const ressid = wx.getStorageSync("loginUserInfo").schooladdressid;
       //校区
      const ID=ressid
      wx.request({
        url: that.$interfaces.addressid+"/"+ID,
        method: "get",
        success: function(res) {
          that.xiaoqu=res.data.name
        }
      });
       const userid=this.schooluserids
       wx.request({
        url: that.$interfaces.userid+"/"+userid,
        method: "get",
        success: function(res) {
          that.zhuteacher=res.data.name
        }
      });
    }
  },
};
</script>
<style>
.lidi{
  margin-bottom:30rpx;
}
.indet{
  text-indent:2em;
}
</style>
